High-Performance Object-Oriented Scientific Programming in Fortran 90
نویسندگان
چکیده
We illustrate how Fortran 90 supports object-oriented concepts by example of plasma particle computations on the IBM SP. Our experience shows that Fortran 90 and object-oriented methodology give high performance while providing a bridge from Fortran 77 legacy codes to modern programming principles. All of our objectoriented Fortran 90 codes execute more quickly than the equivalent C++ versions, yet the abstraction modeling capabilities used for scientific programming are comparably powerful, 1 I n t r o d u c t i o n Computer simulations are very useful for understanding and predicting the transport of particles and energy in fusion energy devices called tokamaks [1]. Tokamaks, which are toroidal in shape, confine the plasma with a combination of an external toroidal magnetic field and a self-generated poloidal magnetic field. The plasma confinement in these devices is not well understood and is worse than desired. One of the two computer models used in the Numerical Turbulent ‘11-ansport Project is a gyrokinetic code—a reduced particle-in-cell (PIC) code that follows the trajectories of guiding centers of particles, neglecting the rapid rotation around the magnetic field. PIC codes integrate the trajectories of many particles subject to electro-magnetic forces, both external and self-generated. These forces are calculated from a set of field equations (usually Maxwell’s equations or a subset) on a grid. The particle’s coordinates are described by continuous variables. The source terms in Maxwell’s equations (charge and/or current density) are calculated on a grid by interpolation. After the field equations have been solved on the grid, the forces on the pm%icles are found by interpolation from the grid. l’he General Concurrent PIC Algorithm [8], which partitions particles and fields among the processors of a distributed-memory supercomputer, can be programmed using an SPMD design approach. Although the Fortran 77 versions of these programs have been wellbenchmarked [4], there is an increasing interest in the scientific community to apply objectoriented principles in scientific programming [12]. In a three-dimensional PIC program, *Jet Propulsion Laboratory, Cahfornia Institute of Technology, Pasadena, CA 91109-8O99. The author’s research was conducted while holding a National Research Council Research Associateship. Email: nort.onc@olympic,jpl .n asa.gov t Department of Physics and Astronomy, ” University of California at Los Angeles, Los Angeles, CA 90024-1547 and Jet Propulsion Laboratory, California Institute of Technology, Pasadena CA 91 10SI8099. The author’s research was sponsored by USDOE, NSF, and under a contract with NASA. Email: decyktlphysics. ucla.edu t Department of Computer Science and Scientific Computation Research Center (SCOREC), Rensselaer Polytechnic Institute, Troy, NY 12180-3590. The author’s research was sponsored under grants CCR9216053 and CCR-9527151 Email: [email protected]. edu
منابع مشابه
Object-oriented Scientific Programming with Fortran 90
Fortran 90 is a modern language that introduces many important new features beneficial for scientific programming. While the array-syntax notation has received the most attention, we have found that many modern softaware development techniques can be supported by this language, including object-oriented concepts. While Fortran 90 is not a full object-oriented language it can directly support ma...
متن کاملHigh-performance language interoperability for scientific computing through Babel
High-performance scientific applications are usually built from software modules written in multiple programming languages. This raises the issue of language interoperability which involves making calls between languages, converting basic types, and bridging disparate programming models. Babel provides a featurerich, extensible, high-performance solution to the language interoperability problem...
متن کاملProspects for Scientific Computing in Polymorphic, Object-Oriented Style
Since the introduction of the Java programming language, there has been widespread interest in the use of Java for high performance scientific computing. One major impediment to such use is the performance penalty paid relative to Fortran. Although Java implementations have made great strides, they still fall short on programs that use the full power of Java’s object-oriented features. In this ...
متن کاملParallel Object-oriented Design in Fortran for Beam Dynamics Simulations∗
In this paper we describe an object-oriented software design approach, using Fortran 90 (F90) and the Message Passing Interface (MPI), for modeling the transport of intense charged particle beams. The object-oriented approach improves the maintainability, resuability, and extensibility of the software, while the use of explicit message passing provides the freedom necessary to achieve high perf...
متن کاملParallel Object-Oriented Computation Applied to a Finite Element Problem
The conventional wisdom in the scientific computing community is that the best way to solve largescale numerically-intensive scientific problems on today’s parallel MIMD computers is to use Fortran or C programmed in a data-parallel style using low-level message-passing primitives. This approach inevitably leads to non-portable codes and extensive development time, and restricts parallel progra...
متن کامل